
<!DOCTYPE html>
<!--

    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>collect-log-files</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/style.css" rel="stylesheet">
    <script src="https://use.fontawesome.com/96c4d89611.js"></script>
  </head>
  <body>
<table id="doc-title" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">
  <b>collect-log-files</b><br />
  </td>
  </tr>
</table>
<hr />

<table width="90%" id="top-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>
		<td align="left">
		<a href="change-master-password.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="configure-jms-cluster.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class=" vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>


<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><a id="collect-log-files-1"></a><a id="GSRFM00007"></a><a id="collect-log-files"></a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_collect_log_files">collect-log-files</h2>
<div class="sectionbody">
<div class="paragraph">
<p>creates a ZIP archive of all available log files</p>
</div>
<div id="sthref69" class="paragraph">
<p>Synopsis</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin [asadmin-options] collect-log-files [--help]
[--target target]
[--retrieve={false|true}] [retrievefilepath]]</code></pre>
</div>
</div>
<div id="sthref70" class="paragraph">
<p>Description</p>
</div>
<div class="paragraph">
<p>The <code>collect-log-files</code> subcommand collects all available log files for
the domain administration server (DAS), the specified cluster, or the
specified \{product---name} instance and creates a single ZIP archive of
the log files. If a cluster is specified, the ZIP archive also contains
the log file for the DAS.</p>
</div>
<div class="paragraph">
<p>This subcommand is supported in remote mode only.</p>
</div>
<div id="sthref71" class="paragraph">
<p>Options</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">asadmin-options</dt>
<dd>
<p>Options for the <code>asadmin</code> utility. For information about these
options, see the <a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> help page.</p>
</dd>
<dt class="hdlist1"><code>--help</code></dt>
<dt class="hdlist1"><code>-?</code></dt>
<dd>
<p>Displays the help text for the subcommand.</p>
</dd>
<dt class="hdlist1"><code>--retrieve</code></dt>
<dd>
<p>Specifies whether the ZIP archive is created in a directory other than
the default directory.<br>
By default the ZIP archive is created in the
domain-dir`/collected-logs` directory. The ZIP file names are
constructed from the specified target and timestamp, as follows:<br></p>
</dd>
</dl>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">log_yyyy-mm-dd_hh-min-sec.zip</code></pre>
</div>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"></dt>
<dd>
<p>Possible values are as follows:<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>false</code></dt>
<dd>
<p>The ZIP archive will be created in the default directory. If
omitted, the <code>--retrieve</code> option defaults to <code>false</code>.</p>
</dd>
<dt class="hdlist1"><code>true</code></dt>
<dd>
<p>The ZIP archive will be created in the directory that the
retrievefilepath operand specifies. If retrievefilepath is omitted,
the ZIP archive will be created in the default directory.</p>
</dd>
</dl>
</div>
</dd>
<dt class="hdlist1"><code>--target</code></dt>
<dd>
<p>Specifies the target for which log files will be collected.<br>
Possible values are as follows:<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>server</code></dt>
<dd>
<p>The log files will be collected for the DAS (default).</p>
</dd>
<dt class="hdlist1">instance-name</dt>
<dd>
<p>The log files will be collected for the specified \{product---name}
instance.</p>
</dd>
<dt class="hdlist1">cluster-name</dt>
<dd>
<p>The log files will be collected for the specified cluster and the
DAS.</p>
</dd>
</dl>
</div>
</dd>
</dl>
</div>
<div id="sthref72" class="paragraph">
<p>Operands</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">retrievefilepath</dt>
<dd>
<p>The name of the directory in which the ZIP archive will be created. If
this operand is omitted, the ZIP archive will be created in the
default directory. If the <code>--retrieve</code> option is <code>false</code>, this operand
is ignored.</p>
</dd>
</dl>
</div>
<div id="sthref73" class="paragraph">
<p>Examples</p>
</div>
<div class="paragraph">
<p><a id="GSRFM451"></a><a id="sthref74"></a></p>
</div>
<div class="paragraph">
<p>Example 1   Collecting Log Files for the Default Server</p>
</div>
<div class="paragraph">
<p>This example generates a ZIP archive from the log files for the default
server.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; collect-log-files
Created Zip file under /space/gfv3/v3setup/glassfish3/glassfish/domains/domain1/\
collected-logs/log_2010-12-15_15-46-23.zip.
Command collect-log-files executed successfully.</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM452"></a><a id="sthref75"></a></p>
</div>
<div class="paragraph">
<p>Example 2   Collecting Log Files for a Cluster</p>
</div>
<div class="paragraph">
<p>This example generates a ZIP archive from the log files for a cluster
named <code>cluster1</code> and the two server instances running in the cluster.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; collect-log-files --target cluster1
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/gfv3/v3setup/glassfish3/glassfish/domains/domain1/\
collected-logs/log_2010-12-15_15-54-06.zip.
Command collect-log-files executed successfully.</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM453"></a><a id="sthref76"></a></p>
</div>
<div class="paragraph">
<p>Example 3   Collecting Log Files in a Directory Other Than the Default
for a Cluster</p>
</div>
<div class="paragraph">
<p>This example generates a ZIP archive from the log files for a cluster
named <code>cluster1</code> and its two server instances, and saves the archive in
a directory named <code>/space/output</code>.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; collect-log-files --target cluster1 --retrieve true /space/output
Log files are downloaded for instance1.
Log files are downloaded for instance2.
Created Zip file under /space/output/log_2010-12-15_15-55-54.zip.
Command collect-log-files executed successfully.</code></pre>
</div>
</div>
<div id="sthref77" class="paragraph">
<p>Exit Status</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>subcommand executed successfully</p>
</dd>
<dt class="hdlist1">1</dt>
<dd>
<p>error in executing the subcommand</p>
</dd>
</dl>
</div>
<div id="sthref78" class="paragraph">
<p>See Also</p>
</div>
<div class="paragraph">
<p><a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a></p>
</div>
<div class="paragraph">
<p><a href="list-log-attributes.html#list-log-attributes-1"><code>list-log-attributes</code>(1)</a>,
<a href="list-log-levels.html#list-log-levels-1"><code>list-log-levels</code>(1)</a>,
<a href="rotate-log.html#rotate-log-1"><code>rotate-log</code>(1)</a>,
<a href="set-log-attributes.html#set-log-attributes-1"><code>set-log-attributes</code>(1)</a>,
<a href="set-log-levels.html#set-log-levels-1"><code>set-log-levels</code>(1)</a></p>
</div>
</div>
</div>

<hr />

<table width="90%" id="bottom-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>		
		<td align="left">
		<a href="change-master-password.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="configure-jms-cluster.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class="vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>

<span id="copyright">
        <img src="/resource/reference/img/eclipse_foundation_logo_tiny.png" height="20px" alt="Eclipse Foundation Logo" align="top"/>&nbsp;            
        <span >Copyright&nbsp;&copy;&nbsp;2019,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span>
</span>

</body>
</html>
